import request from '@/utils/request'


// 查询联系人字段列表
export function getContactsList(type) {
    return request({
      url: '/field/bizCrmField/list/'+type,
      method: 'post',
    })
}

// 查询联系人模块字段列表
export function getContactsListHead(type) {
    return request({
      url: '/field/bizCrmField/queryListHead/'+type,
      method: 'post',
    })
}

// 查询联系人列表页数据
export function queryContactsPageList(data) {
    return request({
      url: '/crm/bizCrmContacts/queryPageList',
      method: 'post',
      data: data
    })
  }

// 新增联系人数据
export function addContacts(data) {
  return request({
    url: '/crm/bizCrmContacts/add',
    method: 'post',
    data: data
  })
}

// 修改联系人数据
export function updateContacts(data) {
  return request({
    url: '/crm/bizCrmContacts/update',
    method: 'post',
    data: data
  })
}

// 根据ID查询信息
export function queryById(data) {
  return request({
    url: '/crm/bizCrmContacts/queryById',
    method: 'post',
    data: data
  })
}

// 根据ID删除数据
export function deleteByIds(data) {
  return request({
    url: '/crm/bizCrmContacts/deleteByIds',
    method: 'post',
    data: data
  })
}

//查询详情页信息
export function informationContacts(customerId,data) {
  return request({
    url: '/crm/bizCrmContacts/information/'+customerId,
    method: 'post',
  })
}

//查询新增所需字段
export function queryContactsField(id) {
  return request({
    url: '/crm/bizCrmContacts/field/'+id,
    method: 'post',
  })
}

//根据ID查询
export function queryByIdContacts(customerId) {
  return request({
    url: '/crm/bizCrmContacts/queryById/'+customerId,
    method: 'post',
  })
}

//基本信息保存修改
export function updateInformationContacts(data) {
  return request({
    url: '/crm/bizCrmContacts/updateInformation',
    method: 'post',
    data:data,
  })
}

//客户标星
export function starContacts(contactsId) {
  return request({
    url: '/crm/bizCrmContacts/star/'+contactsId,
    method: 'post',
  })
}